/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2025-02-27 20:21:03
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2025-02-27 20:41:05
 * @FilePath: \web-warningdevicemanage-v2\src\stores\modules\page.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { computed, ref } from 'vue';
import { defineStore } from 'pinia';
import { PAGE_STORE } from '../constant';

export const pageStore = defineStore(
  PAGE_STORE,
  () => {
    const ProgressNum = ref<string>('');
    const OpenProgress = ref<boolean>(false);
    const setProgressNum = (state: string) => {
      ProgressNum.value = state;
    };
    const setOpenProgress = (state: boolean) => {
      OpenProgress.value = state;
    };
    return {
      ProgressNum,
      setProgressNum,
      OpenProgress,
      setOpenProgress,
    };
  },
  {
    persist: {
      storage: localStorage,
    },
  },
);
